package com.zb.yaml;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author WEN
 * @Date 2023/9/15 0015
 **/
@Component
public class MobilePath implements InitializingBean {
    private static MobilePath mobilePath;

    /**
     * 工单模块报单路径
     */
    @Value("${mobile.order.order-module}")
    private String orderModule;

    @Value("${mobile.network.invite-code-join-customer}")
    private String inviteCodeJoinCustomer;

    /**
     * 防伪连接
     */
    @Value("${mobile.code-security-url}")
    private String codeSecurityUrl;


    @Override
    public void afterPropertiesSet() throws Exception {
        mobilePath = this;
    }

    /**
     * 获取工单模块报单路径
     */
    public static String getOrderModule() {
        return mobilePath.orderModule;
    }

    /**
     * 邀请服务商加入平台路径
     * @return
     */
    public static String getInviteCodeJoinCustomer() {
        return mobilePath.inviteCodeJoinCustomer;
    }

    /**
     * 获取防伪链接
     * @return
     */
    public static String getCodeSecurityUrl() {
        return mobilePath.codeSecurityUrl;
    }
}

